'use strict'
function grouping_count(collection) {
  
  var result=collection.reduce(function( sum, i){
    if(i in sum)
    {
    sum[i]++;}
  else{
  
  sum[i]=1;}
    return sum;
     },{});
     //console.log(sum);
     return result;
    }
    
  

module.exports = grouping_count;
